package com.lakeworks.domain;

import com.lakeworks.common.domain.base.BaseDomain;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 商品信息对象 opr_merchandise
 *
 * @author lake
 * @date 2023-02-08
 */
@Getter
@Setter
@NoArgsConstructor
@Accessors(chain = true)
public class OprMerchandise extends BaseDomain {
    private static final long serialVersionUID = 1L;

    /**
     * 入厂单ID
     */
    @NotNull(message = "入场单ID不能为空")
    private Long pickupId;

    /**
     * 编码
     */
    private String code;

    /**
     * 名称
     */
    @NotBlank(message = "商品名称不能为空")
    private String name;

    /**
     * 备注
     */
    private String comment;

    /**
     * 水洗码
     */
    private String barcode;

    public OprMerchandise(Long pickupId) {
        this.pickupId = pickupId;
    }

    @Override
    public String toString() {
        return "OprMerchandise{" +
                "pickupId=" + pickupId +
                ", code='" + code + '\'' +
                ", name='" + name + '\'' +
                ", comment='" + comment + '\'' +
                ", barcode='" + barcode + '\'' +
                '}';
    }
}
